package copy;

import java.io.*;

//使用缓冲字符流
public class CopyFileWithBufferedStream {
    public static void main(String[] args)
    {
        try(BufferedReader br = new BufferedReader(new FileReader("src/main/source.txt"));
        BufferedWriter bw = new BufferedWriter(new FileWriter("src/main/destination5.txt"))){
            String line;
            while((line=br.readLine())!=null)
            {
                bw.write(line);
                bw.newLine();
            }
        }catch (IOException e)
        {
            e.printStackTrace();
        }
    }
}
